//
//  TbInfo.swift
//
//  Created by 邱仙凯 on 2020/2/10
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public class ZyaTbInfo: Mappable,Codable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let zAddress = "z_address"
    static let zCreateTm = "z_create_tm"
    static let zZbNum = "z_zb_num"
    static let zProvince = "z_province"
    static let zOrgNm = "z_org_nm"
    static let zRecordNo = "z_record_no"
    static let idKey = "id_key"
    static let zOrgId = "z_org_id"
    static let zZcId = "z_zc_id"
    static let zZcNm = "z_zc_nm"
    static let zTel = "z_tel"
    static let zStaffNm = "z_staff_nm"
    static let zBidNo = "z_bid_no"
    static let zContent = "z_content"
    static let zPrice = "z_price"
    static let zTbCompany = "z_tb_company"
    static let zZbId = "z_zb_id"
    static let zCurBidNo = "z_cur_bid_no"
    static let zStaffId = "z_staff_id"
    static let zCity = "z_city"
    static let zStatus = "z_status"
    static let zName = "z_name"
    static let zZbwinId = "z_zbwin_id"
    static let zUnitNm = "z_unit_nm"
    static let tbInfoNew = "tb_info_new"
      static let  zMyself = "z_myself"
  }

  // MARK: Properties
  public var zDepositDt: String?
  public var zAddress: String?
  public var zCreateTm: String?
  public var zZbNum: String?
  public var zProvince: String?
  public var zOrgNm: String?
  public var zRecordNo: String?
  public var idKey: String?
  public var zOrgId: String?
  public var zZcId: String?
  public var zZcNm: String?
  public var zTel: String?
  public var zStaffNm: String?
  public var zBidNo: String?
  public var zContent: String?
  public var zPrice: String?
  public var zTbCompany: String?
  public var zZbId: Int?
  public var zCurBidNo: Int?
  public var zStaffId: Int?
  public var zDeposit: Int?
  public var zCity: String?
  public var zStatus: Int?
  public var zName: String?
  public var zZbwinId: Int?
    public var zUnitNm: String?
    public var tbInfoNew: String?

    public var zMyself:String?
    
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public required init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public func mapping(map: Map) {
    zAddress <- map[SerializationKeys.zAddress]
      zMyself <- (map[SerializationKeys.zMyself],StringTransform())

    zCreateTm <- map[SerializationKeys.zCreateTm]
    zZbNum <- (map[SerializationKeys.zZbNum],StringTransform())
    zProvince <- map[SerializationKeys.zProvince]
    zOrgNm <- map[SerializationKeys.zOrgNm]
    zRecordNo <- map[SerializationKeys.zRecordNo]
    idKey <- map[SerializationKeys.idKey]
    zOrgId <- map[SerializationKeys.zOrgId]
    zZcId <- map[SerializationKeys.zZcId]
    zZcNm <- map[SerializationKeys.zZcNm]
    zTel <- map[SerializationKeys.zTel]
    zStaffNm <- map[SerializationKeys.zStaffNm]
    zBidNo <- map[SerializationKeys.zBidNo]
    zContent <- map[SerializationKeys.zContent]
    zPrice <- (map[SerializationKeys.zPrice],StringTransform_test())
    zTbCompany <- map[SerializationKeys.zTbCompany]
    zZbId <- map[SerializationKeys.zZbId]
    zCurBidNo <- map[SerializationKeys.zCurBidNo]
    zStaffId <- map[SerializationKeys.zStaffId]
    zCity <- map[SerializationKeys.zCity]
    zStatus <- map[SerializationKeys.zStatus]
    zName <- map[SerializationKeys.zName]
    zZbwinId <- map[SerializationKeys.zZbwinId]
    tbInfoNew <- map[SerializationKeys.tbInfoNew]

    
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = zAddress { dictionary[SerializationKeys.zAddress] = value }
    if let value = zCreateTm { dictionary[SerializationKeys.zCreateTm] = value }
    if let value = zZbNum { dictionary[SerializationKeys.zZbNum] = value }
    if let value = zProvince { dictionary[SerializationKeys.zProvince] = value }
    if let value = zOrgNm { dictionary[SerializationKeys.zOrgNm] = value }
    if let value = zRecordNo { dictionary[SerializationKeys.zRecordNo] = value }
    if let value = idKey { dictionary[SerializationKeys.idKey] = value }
    if let value = zOrgId { dictionary[SerializationKeys.zOrgId] = value }
    if let value = zZcId { dictionary[SerializationKeys.zZcId] = value }
    if let value = zZcNm { dictionary[SerializationKeys.zZcNm] = value }
    if let value = zTel { dictionary[SerializationKeys.zTel] = value }
    if let value = zStaffNm { dictionary[SerializationKeys.zStaffNm] = value }
    if let value = zBidNo { dictionary[SerializationKeys.zBidNo] = value }
    if let value = zContent { dictionary[SerializationKeys.zContent] = value }
    if let value = zPrice { dictionary[SerializationKeys.zPrice] = value }
    if let value = zTbCompany { dictionary[SerializationKeys.zTbCompany] = value }
    if let value = zZbId { dictionary[SerializationKeys.zZbId] = value }
    if let value = zCurBidNo { dictionary[SerializationKeys.zCurBidNo] = value }
    if let value = zStaffId { dictionary[SerializationKeys.zStaffId] = value }
    if let value = zCity { dictionary[SerializationKeys.zCity] = value }
    if let value = zStatus { dictionary[SerializationKeys.zStatus] = value }
    if let value = zName { dictionary[SerializationKeys.zName] = value }
    if let value = zZbwinId { dictionary[SerializationKeys.zZbwinId] = value }
    return dictionary
  }

}
